<jsp:include page="header.jsp">
			<jsp:param value="item2" name="item"/>
</jsp:include> 
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<section class="content">
	<section class="widget">
		<header>
			<span class="icon">&#128196;</span>
			<hgroup>
				<h1>点数兑换规则管理</h1>
				<h2>兑换物品列表</h2>
			</hgroup>
		</header>
		<div class="content">
		<div class="tabs" id="tabs">
		    <ul>
		        <li class="on">兑换规则</li>
		        <li><a href="giftManage">物品</a></li>
		        <li ><a href="exchangeRecordManage">修改状态</a></li>
		    </ul>
		    	<div class="show">
		    		
		    		<s:fielderror cssStyle="color:red"></s:fielderror>
					<s:if test="rule != null">
							兑率:兑换1元现金时所需要的点数，如1.0 点数/元，即兑换一元现金时需要1个点数<br/><br/>
							<s:form action="updateRule" name="updateRule" method="post">
								<input type="text" name="rule.rate" value="<s:property value="rule.rate"/>" required="required"/>点数/元
								<input type="submit" class ="white" value="修改">
							</s:form>
					</s:if>
					<s:else>
						尚无规则！！
					</s:else>
		    	
		    	</div>
		</div>
		</div>
	</section>
	<script>
		    var oTab = document.getElementById("tabs");
			    var oUl = oTab.getElementsByTagName("ul")[0];
			    var oLis = oUl.getElementsByTagName("li");
			
			    for(var i= 0,len = oLis.length;i<len;i++){
			        oLis[i].onclick = function() {
			            for(var n= 0;n<len;n++){
			                oLis[n].className = "";
			            }
			            this.className = "on";
			        };
			    }
		   var message="<%=request.getAttribute("message")%>";
			if(message!="null"){
				alert(message);
			}
	</script>
<%@ include file="footer.jsp" %>